package com.xiaobaibai.entity;

import com.baomidou.mybatisplus.annotation.*;
import com.fasterxml.jackson.annotation.JsonInclude;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import lombok.EqualsAndHashCode;

import java.io.Serializable;
import java.math.BigDecimal;
import java.util.Date;

/**
 * <p>
 * 
 * </p>
 *
 * @author xiaobaibai
 * @since 2020-10-16
 */
@Data
@EqualsAndHashCode(callSuper = false)
@TableName("`order`")
@ApiModel(value="Order对象", description="")
@JsonInclude(value = JsonInclude.Include.NON_NULL)
public class Order implements Serializable {

    private static final long serialVersionUID = 1L;

    @ApiModelProperty(value = "自生成订单id(用户id+时间戳)")
    @TableId(value = "order_id", type = IdType.INPUT)
    private String orderId;

    @ApiModelProperty(value = "用户id")
    @TableField("user_id")
    private Integer userId;

    @ApiModelProperty(value = "用户姓名")
    @TableField("user_name")
    private String userName;

    @ApiModelProperty(value = "用户电话")
    @TableField("user_phone")
    private String userPhone;

    @ApiModelProperty(value = "送往地址")
    @TableField("user_address")
    private String userAddress;

    @ApiModelProperty(value = "用户备注")
    @TableField("user_remarks")
    private String userRemarks;

    @ApiModelProperty(value = "订单总价")
    @TableField("order_price")
    private BigDecimal orderPrice;

    @ApiModelProperty(value = "用户砍价表id")
    @TableField("bargain_user_id")
    private Integer bargainUserId;

    @ApiModelProperty(value = "订单优惠券id(-1则没使用)")
    @TableField("order_coupon_id")
    private Integer orderCouponId;

    @ApiModelProperty(value = "订单优惠金额")
    @TableField("order_reduce_amount")
    private BigDecimal orderReduceAmount;

    @ApiModelProperty(value = "运费")
    @TableField("order_shipping")
    private Integer orderShipping;

    @ApiModelProperty(value = "用户实付金额")
    @TableField("order_real_price")
    private BigDecimal orderRealPrice;

    @ApiModelProperty(value = "订单状态")
    @TableField("order_status")
    private Integer orderStatus;

    @ApiModelProperty(value = "创建时间")
    @TableField(value = "create_time", fill = FieldFill.INSERT)
    private Date createTime;

    @ApiModelProperty(value = "修改时间")
    @TableField(value = "update_time", fill = FieldFill.INSERT_UPDATE)
    private Date updateTime;


}
